<%@ page import="com.apexedu.framework.util.DBUtil"%>
<%@ page import="com.apexedu.identity.IdConstants"%>
<%@ page import="com.apexedu.identity.entity.TSysUser"%>
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<%
	TSysUser user = (TSysUser) request.getSession().getAttribute(IdConstants.SESSION_USER);
	String screenname = user.getUserloginid();
	String ye = "";
	try {
		ye = DBUtil.queryField("select to_char(ye) from v_onecard_ye where userid=?", screenname);
	} catch (Exception e) {
		System.out.println(e.toString());
	}
	request.setAttribute("ye", ye);
	System.out.print("一卡通余额：" + ye);
%>
<head>
<title>上海工业技术学校</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript">
	function gotoHtml(url) {
		var url_ = url.replace('$username$', '<%=screenname%>');
		window.open(url_);
	}
</script>
</head>
<body>

	<div id="main">
		<jsp:include page="head.jsp" />

		<div id="content">
			<div id="contentSub" class="contentSub${type}">
				<div id="msgDiv">
					<div class="contentHead1">
						<span class="titleSpan">消息提醒</span>
						<%--<span class="moreSpan" o="msgContent"> 更多 </span>--%>
					</div>
					<div class="msgDiv">
						<div class="listmessage">
							<font color="aqua">${null == ye ? "一卡通余额:0元" : ye}</font>
							<c:if test="${dbts>0}">
								<div class="listmessagedata1">
									<span class="dbtxA" style="cursor: pointer;">
										您有<font style="color: #290e7e; font-weight: bold" href="javascript:;"> &nbsp;${dbts}&nbsp;</font>条待办事宜信息，请及时处理！
									</span>
								</div>
							</c:if>
							<c:forEach items="${msgs}" var="msg">
								<div class="listmessagedata1">${msg.title}</div>
							</c:forEach>

							<a target="_blank" href="${sslLoginUrl}">您有 ${null == unreadMailNumber ? 0:unreadMailNumber} 封未读邮件！</a>

						</div>
					</div>
					<div class="calDiv">
						<span class="weekSpan">${weekday}</span>
						<span class="dateSpan">
							<c:if test="${'null' == zc}">
							非教学周
						</c:if>
							<c:if test="${'null' != zc}">
							第&nbsp;${zc}&nbsp;教学周
						</c:if>
							&nbsp;${year}&nbsp;年&nbsp;${month}&nbsp;月<b>${date}</b>日
						</span>
					</div>
				</div>
				<c:if test="${type=='ld' || type =='ls'}">
					<div id="newsDiv" class="newsDiv${type}">
						<div class="lbxxtitle">
							<ul>
								<li class="select">
									待办事宜
									<c:if test="${dbts>0}">
										<font style="color: orangered; margin-left: 5px;">${dbts}</font>
									</c:if>
								</li>
							</ul>
							<span class="turnSpan">
								<img src="${basePath}/resources/images/left.png" class="prev">
									&nbsp;&nbsp;&nbsp; <b class="pageNoB">1</b>&nbsp;&nbsp;/&nbsp;&nbsp; <b class="totalPageNoB">${dbsyys}</b>&nbsp;&nbsp;&nbsp; <img src="${basePath}/resources/images/right.png" class="next">&nbsp;&nbsp;&nbsp; 
							</span>
						</div>
						<div class="lbxxcontent">
							<ul class="select">
								<c:forEach items="${dbsy}" var="lbxx">
									<li hr="${lbxx.depart}">
										<span class="lbxxContentSpan" title="${lbxx.title}">${lbxx.title}</span>
										<span class="lbxxTimeSpan">
											<fmt:formatDate value="${lbxx.time}" pattern="yyyy-MM-dd" />
										</span>
									</li>
								</c:forEach>
							</ul>
						</div>
					</div>
					<div id="serverDiv">
						<div id="serverType">
							<ul>
								<c:forEach items="${serversType}" var="serverType">
									<li menuid="${serverType.menuid}">${serverType.menuname}</li>
								</c:forEach>
								<li class="select">全部</li>
							</ul>
						</div>
						<div id="serverList">
							<c:forEach items="${servers}" var="menu">
								<div class="server" menuid="${menu.menuid}">
									<div class="servericon" style="background-color: ${menu.bgcolor};" onclick="gotoHtml('${menu.menupath}');">
										<img src="${basePath}/resources/images/icons/${menu.tb}" onerror="this.src='${basePath}/resources/images/icons/icons-01.png'">
									</div>
									<div class="servertitle" title="${menu.menuname}" style="color: #FFFFFF;">
										<!-- 服务ID -->
										<a href="#" target="_blank" onclick="gotoHtml('${menu.menupath}');">${menu.menuname}</a>
									</div>
								</div>
							</c:forEach>
							<c:if test="${iskdy}">
								<div class="server serverAdd" onclick="window.open('${basePath}/s/uc/se/i/${mrfwid}')">
									<div class="servericon">
										<img src="${basePath}/resources/images/icons/addMore.png">
									</div>
									<div class="servertitle">
										<span class="addSpan"> 订阅 </span>
									</div>
								</div>
							</c:if>
						</div>
					</div>
				</c:if>
				<c:if test="${type=='xs'}">
					<div style="margin: 10px 0px 0px -10px;">
						<c:forEach items="${servers}" var="menu">
							<div class="server" menuid="${menu.menuid}">
								<div class="servericon" style="background-color: ${menu.bgcolor};" onclick="window.open('${menu.menupath}')">
									<img src="${basePath}/resources/images/icons/${menu.tb}" onerror="this.src='${basePath}/resources/images/icons/icons-01.png'">
								</div>
								<div class="servertitle" title="${menu.menuname}" style="color: #FFFFFF;">
									<!-- 服务ID -->
									<a href="${menu.menupath}" target="_blank">${menu.menuname}</a>
								</div>
							</div>
						</c:forEach>
						<c:if test="${iskdy}">
							<div class="server serverAdd" onclick="window.open('${basePath}/s/uc/se/i/${mrfwid}')">
								<div class="servericon">
									<img src="${basePath}/resources/images/icons/addMore.png">
								</div>
								<div class="servertitle">
									<span class="addSpan"> 订阅 </span>
								</div>
							</div>
						</c:if>
					</div>
				</c:if>
				<div class="popupDiv">
					<div class="close" title="点击关闭"></div>
					<iframe width="100%" height="100%" scrolling="no" frameborder="0"></iframe>
				</div>
			</div>
		</div>
		<jsp:include page="foot.jsp" />
	</div>
</body>
</html>
